!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define("rb_wixui.thunderbolt[SearchBox]",["react","reactDOM"],t):"object"==typeof exports?exports["rb_wixui.thunderbolt[SearchBox]"]=t(require("react"),require("react-dom")):e["rb_wixui.thunderbolt[SearchBox]"]=t(e.React,e.ReactDOM)}("undefined"!=typeof self?self:this,(function(e,t){return function(){var n={5329:function(t){"use strict";t.exports=e},95561:function(e){"use strict";e.exports=t},448:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t.keyCode===e&&(t.preventDefault(),t.stopPropagation(),t.currentTarget.click())}}g(32),g(l),g(u);const m="has-custom-focus",p=["aria-id","aria-metadata","aria-type"],f=({role:e,tabIndex:t,tabindex:n,...i}={})=>{const a=Object.entries(i).reduce(((e,[t,n])=>({...e,[`aria-${t}`.toLowerCase()]:n})),{role:e,tabIndex:t??n});return Object.keys(a).forEach((e=>{void 0!==a[e]&&null!==a[e]||delete a[e]})),o=a,r=p,Object.entries(o).reduce(((e,[t,n])=>(r.includes(t)||(e[t]=n),e)),{});var o,r},E=()=>"undefined"!=typeof window,T=e=>Object.entries(e).reduce(((e,[t,n])=>(t.includes("data-")&&(e[t]=n),e)),{});const _="wixui-",I=(e,...t)=>{const n=[];return e&&n.push(`${_}${e}`),t.forEach((e=>{e&&(n.push(`${_}${e}`),n.push(e))})),n.join(" ")};var L={root:"search-bar",icon:"search-bar__icon",input:"search-bar__input"},b="HlRz5e";const v="v1",C=2,S=1920,y=1920,A=1e3,w=1e3,O={SCALE_TO_FILL:"fill",SCALE_TO_FIT:"fit",STRETCH:"stretch",ORIGINAL_SIZE:"original_size",TILE:"tile",TILE_HORIZONTAL:"tile_horizontal",TILE_VERTICAL:"tile_vertical",FIT_AND_TILE:"fit_and_tile",LEGACY_STRIP_TILE:"legacy_strip_tile",LEGACY_STRIP_TILE_HORIZONTAL:"legacy_strip_tile_horizontal",LEGACY_STRIP_TILE_VERTICAL:"legacy_strip_tile_vertical",LEGACY_STRIP_SCALE_TO_FILL:"legacy_strip_fill",LEGACY_STRIP_SCALE_TO_FIT:"legacy_strip_fit",LEGACY_STRIP_FIT_AND_TILE:"legacy_strip_fit_and_tile",LEGACY_STRIP_ORIGINAL_SIZE:"legacy_strip_original_size",LEGACY_ORIGINAL_SIZE:"actual_size",LEGACY_FIT_WIDTH:"fitWidth",LEGACY_FIT_HEIGHT:"fitHeight",LEGACY_FULL:"full",LEGACY_BG_FIT_AND_TILE:"legacy_tile",LEGACY_BG_FIT_AND_TILE_HORIZONTAL:"legacy_tile_horizontal",LEGACY_BG_FIT_AND_TILE_VERTICAL:"legacy_tile_vertical",LEGACY_BG_NORMAL:"legacy_normal"},M={FIT:"fit",FILL:"fill",FILL_FOCAL:"fill_focal",CROP:"crop",LEGACY_CROP:"legacy_crop",LEGACY_FILL:"legacy_fill"},R={CENTER:"center",TOP:"top",TOP_LEFT:"top_left",TOP_RIGHT:"top_right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom_left",BOTTOM_RIGHT:"bottom_right",LEFT:"left",RIGHT:"right"},N={[R.CENTER]:{x:.5,y:.5},[R.TOP_LEFT]:{x:0,y:0},[R.TOP_RIGHT]:{x:1,y:0},[R.TOP]:{x:.5,y:0},[R.BOTTOM_LEFT]:{x:0,y:1},[R.BOTTOM_RIGHT]:{x:1,y:1},[R.BOTTOM]:{x:.5,y:1},[R.RIGHT]:{x:1,y:.5},[R.LEFT]:{x:0,y:.5}},F={center:"c",top:"t",top_left:"tl",top_right:"tr",bottom:"b",bottom_left:"bl",bottom_right:"br",left:"l",right:"r"},x={BG:"bg",IMG:"img",SVG:"svg"},k={AUTO:"auto",CLASSIC:"classic",SUPER:"super"},G={classic:1,super:2},P={radius:"0.66",amount:"1.00",threshold:"0.01"},B={uri:"",css:{img:{},container:{}},attr:{img:{},container:{}},transformed:!1},H=25e6,V=[1.5,2,4],D={HIGH:{size:196e4,quality:90,maxUpscale:1},MEDIUM:{size:36e4,quality:85,maxUpscale:1},LOW:{size:16e4,quality:80,maxUpscale:1.2},TINY:{size:0,quality:80,maxUpscale:1.4}},Y={HIGH:"HIGH",MEDIUM:"MEDIUM",LOW:"LOW",TINY:"TINY"},U={CONTRAST:"contrast",BRIGHTNESS:"brightness",SATURATION:"saturation",HUE:"hue",BLUR:"blur"},$={JPG:"jpg",JPEG:"jpeg",JPE:"jpe",PNG:"png",WEBP:"webp",WIX_ICO_MP:"wix_ico_mp",WIX_MP:"wix_mp",GIF:"gif",SVG:"svg",AVIF:"avif",UNRECOGNIZED:"unrecognized"},j={AVIF:"AVIF",PAVIF:"PAVIF"};$.JPG,$.JPEG,$.JPE,$.PNG,$.GIF,$.WEBP;function q(e,...t){return function(...n){const i=n[n.length-1]||{},a=[e[0]];return t.forEach((function(t,o){const r=Number.isInteger(t)?n[t]:i[t];a.push(r,e[o+1])})),a.join("")}}function z(e){return e[e.length-1]}const Z=[$.PNG,$.JPEG,$.JPG,$.JPE,$.WIX_ICO_MP,$.WIX_MP,$.WEBP,$.AVIF],W=[$.JPEG,$.JPG,$.JPE];function J(e,t,n){return n&&t&&!(!(i=t.id)||!i.trim()||"none"===i.toLowerCase())&&Object.values(O).includes(e);var i}function X(e,t,n){return function(e,t,n=!1){return!((Q(e)||te(e))&&t&&!n)}(e,t,n)&&(function(e){return Z.includes(re(e))}(e)||function(e,t=!1){return ee(e)&&t}(e,n))&&!/(^https?)|(^data)|(^\/\/)/.test(e)}function K(e){return re(e)===$.PNG}function Q(e){return re(e)===$.WEBP}function ee(e){return re(e)===$.GIF}function te(e){return re(e)===$.AVIF}const ne=["/","\\","?","<",">","|","\u201c",":",'"'].map(encodeURIComponent),ie=["\\.","\\*"],ae="_";function oe(e){return function(e){return W.includes(re(e))}(e)?$.JPG:K(e)?$.PNG:Q(e)?$.WEBP:ee(e)?$.GIF:te(e)?$.AVIF:$.UNRECOGNIZED}function re(e){return(/[.]([^.]+)$/.exec(e)&&/[.]([^.]+)$/.exec(e)[1]||"").toLowerCase()}function se(e,t,n,i,a){let o;return o=a===M.FILL?function(e,t,n,i){return Math.max(n/e,i/t)}(e,t,n,i):a===M.FIT?function(e,t,n,i){return Math.min(n/e,i/t)}(e,t,n,i):1,o}function ce(e,t,n,i,a,o){e=e||i.width,t=t||i.height;const{scaleFactor:r,width:s,height:c}=function(e,t,n,i,a){let o,r=n,s=i;if(o=se(e,t,n,i,a),a===M.FIT&&(r=e*o,s=t*o),r&&s&&r*s>H){const n=Math.sqrt(H/(r*s));r*=n,s*=n,o=se(e,t,r,s,a)}return{scaleFactor:o,width:r,height:s}}(e,t,i.width*a,i.height*a,n);return function(e,t,n,i,a,o,r){const{optimizedScaleFactor:s,upscaleMethodValue:c,forceUSM:l}=function(e,t,n,i){if("auto"===i)return function(e,t){const n=he(e,t);return{optimizedScaleFactor:D[n].maxUpscale,upscaleMethodValue:G.classic,forceUSM:!1}}(e,t);if("super"===i)return function(e){return{optimizedScaleFactor:z(V),upscaleMethodValue:G.super,forceUSM:!(V.includes(e)||e>z(V))}}(n);return function(e,t){const n=he(e,t);return{optimizedScaleFactor:D[n].maxUpscale,upscaleMethodValue:G.classic,forceUSM:!1}}(e,t)}(e,t,o,a);let u=n,d=i;if(o<=s)return{width:u,height:d,scaleFactor:o,upscaleMethodValue:c,forceUSM:l,cssUpscaleNeeded:!1};switch(r){case M.FILL:u=n*(s/o),d=i*(s/o);break;case M.FIT:u=e*s,d=t*s}return{width:u,height:d,scaleFactor:s,upscaleMethodValue:c,forceUSM:l,cssUpscaleNeeded:!0}}(e,t,s,c,o,r,n)}function le(e,t,n,i){const a=de(n)||function(e=R.CENTER){return N[e]}(i);return{x:Math.max(0,Math.min(e.width-t.width,a.x*e.width-t.width/2)),y:Math.max(0,Math.min(e.height-t.height,a.y*e.height-t.height/2)),width:Math.min(e.width,t.width),height:Math.min(e.height,t.height)}}function ue(e){return e.alignment&&F[e.alignment]||F[R.CENTER]}function de(e){let t;return!e||"number"!=typeof e.x||isNaN(e.x)||"number"!=typeof e.y||isNaN(e.y)||(t={x:ge(Math.max(0,Math.min(100,e.x))/100,2),y:ge(Math.max(0,Math.min(100,e.y))/100,2)}),t}function he(e,t){const n=e*t;return n>D[Y.HIGH].size?Y.HIGH:n>D[Y.MEDIUM].size?Y.MEDIUM:n>D[Y.LOW].size?Y.LOW:Y.TINY}function ge(e,t){const n=Math.pow(10,t||0);return(e*n/n).toFixed(t)}function me(e){return e&&e.upscaleMethod&&k[e.upscaleMethod.toUpperCase()]||k.AUTO}function pe(e,t){const n=Q(e)||te(e);return re(e)===$.GIF||n&&t}const fe={isMobile:!1},Ee=function(e){return fe[e]};function Te(){if("undefined"!=typeof window&&"undefined"!=typeof navigator){const t=window.matchMedia&&window.matchMedia("(max-width: 767px)").matches,n=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);e=t&&n,fe["isMobile"]=e}var e}function _e(e,t){const n={css:{container:{}}},{css:i}=n,{fittingType:a}=e;switch(a){case O.ORIGINAL_SIZE:case O.LEGACY_ORIGINAL_SIZE:case O.LEGACY_STRIP_ORIGINAL_SIZE:i.container.backgroundSize="auto",i.container.backgroundRepeat="no-repeat";break;case O.SCALE_TO_FIT:case O.LEGACY_STRIP_SCALE_TO_FIT:i.container.backgroundSize="contain",i.container.backgroundRepeat="no-repeat";break;case O.STRETCH:i.container.backgroundSize="100% 100%",i.container.backgroundRepeat="no-repeat";break;case O.SCALE_TO_FILL:case O.LEGACY_STRIP_SCALE_TO_FILL:i.container.backgroundSize="cover",i.container.backgroundRepeat="no-repeat";break;case O.TILE_HORIZONTAL:case O.LEGACY_STRIP_TILE_HORIZONTAL:i.container.backgroundSize="auto",i.container.backgroundRepeat="repeat-x";break;case O.TILE_VERTICAL:case O.LEGACY_STRIP_TILE_VERTICAL:i.container.backgroundSize="auto",i.container.backgroundRepeat="repeat-y";break;case O.TILE:case O.LEGACY_STRIP_TILE:i.container.backgroundSize="auto",i.container.backgroundRepeat="repeat";break;case O.LEGACY_STRIP_FIT_AND_TILE:i.container.backgroundSize="contain",i.container.backgroundRepeat="repeat";break;case O.FIT_AND_TILE:case O.LEGACY_BG_FIT_AND_TILE:i.container.backgroundSize="auto",i.container.backgroundRepeat="repeat";break;case O.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:i.container.backgroundSize="auto",i.container.backgroundRepeat="repeat-x";break;case O.LEGACY_BG_FIT_AND_TILE_VERTICAL:i.container.backgroundSize="auto",i.container.backgroundRepeat="repeat-y";break;case O.LEGACY_BG_NORMAL:i.container.backgroundSize="auto",i.container.backgroundRepeat="no-repeat"}switch(t.alignment){case R.CENTER:i.container.backgroundPosition="center center";break;case R.LEFT:i.container.backgroundPosition="left center";break;case R.RIGHT:i.container.backgroundPosition="right center";break;case R.TOP:i.container.backgroundPosition="center top";break;case R.BOTTOM:i.container.backgroundPosition="center bottom";break;case R.TOP_RIGHT:i.container.backgroundPosition="right top";break;case R.TOP_LEFT:i.container.backgroundPosition="left top";break;case R.BOTTOM_RIGHT:i.container.backgroundPosition="right bottom";break;case R.BOTTOM_LEFT:i.container.backgroundPosition="left bottom"}return n}const Ie={[R.CENTER]:"center",[R.TOP]:"top",[R.TOP_LEFT]:"top left",[R.TOP_RIGHT]:"top right",[R.BOTTOM]:"bottom",[R.BOTTOM_LEFT]:"bottom left",[R.BOTTOM_RIGHT]:"bottom right",[R.LEFT]:"left",[R.RIGHT]:"right"},Le={position:"absolute",top:"auto",right:"auto",bottom:"auto",left:"auto"};function be(e,t){const n={css:{container:{},img:{}}},{css:i}=n,{fittingType:a}=e,o=t.alignment;switch(i.container.position="relative",a){case O.ORIGINAL_SIZE:case O.LEGACY_ORIGINAL_SIZE:e.parts&&e.parts.length?(i.img.width=e.parts[0].width,i.img.height=e.parts[0].height):(i.img.width=e.src.width,i.img.height=e.src.height);break;case O.SCALE_TO_FIT:case O.LEGACY_FIT_WIDTH:case O.LEGACY_FIT_HEIGHT:case O.LEGACY_FULL:i.img.width=t.width,i.img.height=t.height,i.img.objectFit="contain",i.img.objectPosition=Ie[o]||"unset";break;case O.LEGACY_BG_NORMAL:i.img.width="100%",i.img.height="100%",i.img.objectFit="none",i.img.objectPosition=Ie[o]||"unset";break;case O.STRETCH:i.img.width=t.width,i.img.height=t.height,i.img.objectFit="fill";break;case O.SCALE_TO_FILL:i.img.width=t.width,i.img.height=t.height,i.img.objectFit="cover"}if("number"==typeof i.img.width&&"number"==typeof i.img.height&&(i.img.width!==t.width||i.img.height!==t.height)){const e=Math.round((t.height-i.img.height)/2),n=Math.round((t.width-i.img.width)/2);Object.assign(i.img,Le,function(e,t,n){return{[R.TOP_LEFT]:{top:0,left:0},[R.TOP_RIGHT]:{top:0,right:0},[R.TOP]:{top:0,left:t},[R.BOTTOM_LEFT]:{bottom:0,left:0},[R.BOTTOM_RIGHT]:{bottom:0,right:0},[R.BOTTOM]:{bottom:0,left:t},[R.RIGHT]:{top:e,right:0},[R.LEFT]:{top:e,left:0},[R.CENTER]:{width:n.width,height:n.height,objectFit:"none"}}}(e,n,t)[o])}return n}function ve(e,t){const n={css:{container:{}},attr:{container:{},img:{}}},{css:i,attr:a}=n,{fittingType:o}=e,r=t.alignment,{width:s,height:c}=e.src;let l;switch(i.container.position="relative",o){case O.ORIGINAL_SIZE:case O.LEGACY_ORIGINAL_SIZE:case O.TILE:e.parts&&e.parts.length?(a.img.width=e.parts[0].width,a.img.height=e.parts[0].height):(a.img.width=s,a.img.height=c),a.img.preserveAspectRatio="xMidYMid slice";break;case O.SCALE_TO_FIT:case O.LEGACY_FIT_WIDTH:case O.LEGACY_FIT_HEIGHT:case O.LEGACY_FULL:a.img.width="100%",a.img.height="100%",a.img.transform="",a.img.preserveAspectRatio="";break;case O.STRETCH:a.img.width=t.width,a.img.height=t.height,a.img.x=0,a.img.y=0,a.img.transform="",a.img.preserveAspectRatio="none";break;case O.SCALE_TO_FILL:X(e.src.id)?(a.img.width=t.width,a.img.height=t.height):(l=function(e,t,n,i,a){const o=se(e,t,n,i,a);return{width:Math.round(e*o),height:Math.round(t*o)}}(s,c,t.width,t.height,M.FILL),a.img.width=l.width,a.img.height=l.height),a.img.x=0,a.img.y=0,a.img.transform="",a.img.preserveAspectRatio="xMidYMid slice"}if("number"==typeof a.img.width&&"number"==typeof a.img.height&&(a.img.width!==t.width||a.img.height!==t.height)){let e,n,i=0,s=0;o===O.TILE?(e=t.width%a.img.width,n=t.height%a.img.height):(e=t.width-a.img.width,n=t.height-a.img.height);const c=Math.round(e/2),l=Math.round(n/2);switch(r){case R.TOP_LEFT:i=0,s=0;break;case R.TOP:i=c,s=0;break;case R.TOP_RIGHT:i=e,s=0;break;case R.LEFT:i=0,s=l;break;case R.CENTER:i=c,s=l;break;case R.RIGHT:i=e,s=l;break;case R.BOTTOM_LEFT:i=0,s=n;break;case R.BOTTOM:i=c,s=n;break;case R.BOTTOM_RIGHT:i=e,s=n}a.img.x=i,a.img.y=s}return a.container.width=t.width,a.container.height=t.height,a.container.viewBox=[0,0,t.width,t.height].join(" "),n}function Ce(e,t,n){let i;switch(t.crop&&(i=function(e,t){const n=Math.max(0,Math.min(e.width,t.x+t.width)-Math.max(0,t.x)),i=Math.max(0,Math.min(e.height,t.y+t.height)-Math.max(0,t.y));return n&&i&&(e.width!==n||e.height!==i)?{x:Math.max(0,t.x),y:Math.max(0,t.y),width:n,height:i}:null}(t,t.crop),i&&(e.src.width=i.width,e.src.height=i.height,e.src.isCropped=!0,e.parts.push(ye(i)))),e.fittingType){case O.SCALE_TO_FIT:case O.LEGACY_FIT_WIDTH:case O.LEGACY_FIT_HEIGHT:case O.LEGACY_FULL:case O.FIT_AND_TILE:case O.LEGACY_BG_FIT_AND_TILE:case O.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:case O.LEGACY_BG_FIT_AND_TILE_VERTICAL:case O.LEGACY_BG_NORMAL:e.parts.push(Se(e,n));break;case O.SCALE_TO_FILL:e.parts.push(function(e,t){const n=ce(e.src.width,e.src.height,M.FILL,t,e.devicePixelRatio,e.upscaleMethod),i=de(e.focalPoint);return{transformType:i?M.FILL_FOCAL:M.FILL,width:Math.round(n.width),height:Math.round(n.height),alignment:ue(t),focalPointX:i&&i.x,focalPointY:i&&i.y,upscale:n.scaleFactor>1,forceUSM:n.forceUSM,scaleFactor:n.scaleFactor,cssUpscaleNeeded:n.cssUpscaleNeeded,upscaleMethodValue:n.upscaleMethodValue}}(e,n));break;case O.STRETCH:e.parts.push(function(e,t){const n=se(e.src.width,e.src.height,t.width,t.height,M.FILL),i={...t};return i.width=e.src.width*n,i.height=e.src.height*n,Se(e,i)}(e,n));break;case O.TILE_HORIZONTAL:case O.TILE_VERTICAL:case O.TILE:case O.LEGACY_ORIGINAL_SIZE:case O.ORIGINAL_SIZE:i=le(e.src,n,e.focalPoint,n.alignment),e.src.isCropped?(Object.assign(e.parts[0],i),e.src.width=i.width,e.src.height=i.height):e.parts.push(ye(i));break;case O.LEGACY_STRIP_TILE_HORIZONTAL:case O.LEGACY_STRIP_TILE_VERTICAL:case O.LEGACY_STRIP_TILE:case O.LEGACY_STRIP_ORIGINAL_SIZE:e.parts.push(function(e){return{transformType:M.LEGACY_CROP,width:Math.round(e.width),height:Math.round(e.height),alignment:ue(e),upscale:!1,forceUSM:!1,scaleFactor:1,cssUpscaleNeeded:!1}}(n));break;case O.LEGACY_STRIP_SCALE_TO_FIT:case O.LEGACY_STRIP_FIT_AND_TILE:e.parts.push(function(e){return{transformType:M.FIT,width:Math.round(e.width),height:Math.round(e.height),upscale:!1,forceUSM:!0,scaleFactor:1,cssUpscaleNeeded:!1}}(n));break;case O.LEGACY_STRIP_SCALE_TO_FILL:e.parts.push(function(e){return{transformType:M.LEGACY_FILL,width:Math.round(e.width),height:Math.round(e.height),alignment:ue(e),upscale:!1,forceUSM:!0,scaleFactor:1,cssUpscaleNeeded:!1}}(n))}}function Se(e,t){const n=ce(e.src.width,e.src.height,M.FIT,t,e.devicePixelRatio,e.upscaleMethod);return{transformType:!e.src.width||!e.src.height?M.FIT:M.FILL,width:Math.round(n.width),height:Math.round(n.height),alignment:F.center,upscale:n.scaleFactor>1,forceUSM:n.forceUSM,scaleFactor:n.scaleFactor,cssUpscaleNeeded:n.cssUpscaleNeeded,upscaleMethodValue:n.upscaleMethodValue}}function ye(e){return{transformType:M.CROP,x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height),upscale:!1,forceUSM:!1,scaleFactor:1,cssUpscaleNeeded:!1}}function Ae(e,t){t=t||{},e.quality=function(e,t){const n=e.fileType===$.PNG,i=e.fileType===$.JPG,a=e.fileType===$.WEBP,o=e.fileType===$.AVIF,r=i||n||a||o;if(r){const i=z(e.parts),a=(s=i.width,c=i.height,D[he(s,c)].quality);let o=t.quality&&t.quality>=5&&t.quality<=90?t.quality:a;return o=n?o+5:o,o}var s,c;return 0}(e,t),e.progressive=function(e){return!1!==e.progressive}(t),e.watermark=function(e){return e.watermark}(t),e.autoEncode=t.autoEncode??!0,e.encoding=t?.encoding,e.unsharpMask=function(e,t){if(function(e){const t="number"==typeof(e=e||{}).radius&&!isNaN(e.radius)&&e.radius>=.1&&e.radius<=500,n="number"==typeof e.amount&&!isNaN(e.amount)&&e.amount>=0&&e.amount<=10,i="number"==typeof e.threshold&&!isNaN(e.threshold)&&e.threshold>=0&&e.threshold<=255;return t&&n&&i}(t.unsharpMask))return{radius:ge(t.unsharpMask?.radius,2),amount:ge(t.unsharpMask?.amount,2),threshold:ge(t.unsharpMask?.threshold,2)};if(("number"!=typeof(n=(n=t.unsharpMask)||{}).radius||isNaN(n.radius)||0!==n.radius||"number"!=typeof n.amount||isNaN(n.amount)||0!==n.amount||"number"!=typeof n.threshold||isNaN(n.threshold)||0!==n.threshold)&&function(e){const t=z(e.parts);return!(t.scaleFactor>=1)||t.forceUSM||t.transformType===M.FIT}(e))return P;var n;return}(e,t),e.filters=function(e){const t=e.filters||{},n={};we(t[U.CONTRAST],-100,100)&&(n[U.CONTRAST]=t[U.CONTRAST]);we(t[U.BRIGHTNESS],-100,100)&&(n[U.BRIGHTNESS]=t[U.BRIGHTNESS]);we(t[U.SATURATION],-100,100)&&(n[U.SATURATION]=t[U.SATURATION]);we(t[U.HUE],-180,180)&&(n[U.HUE]=t[U.HUE]);we(t[U.BLUR],0,100)&&(n[U.BLUR]=t[U.BLUR]);return n}(t)}function we(e,t,n){return"number"==typeof e&&!isNaN(e)&&0!==e&&e>=t&&e<=n}function Oe(e,t,n,i){const a=function(e){return e?.isSEOBot??!1}(i),o=oe(t.id),r=function(e,t){const n=/\.([^.]*)$/,i=new RegExp(`(${ne.concat(ie).join("|")})`,"g");if(t&&t.length){let e=t;const a=t.match(n);return a&&Z.includes(a[1])&&(e=t.replace(n,"")),encodeURIComponent(e).replace(i,ae)}const a=e.match(/\/(.*?)$/);return(a?a[1]:e).replace(n,"")}(t.id,t.name),s=a?1:function(e){return Math.min(e.pixelAspectRatio||1,C)}(n),c=re(t.id),l=c,u=X(t.id,i?.hasAnimation,i?.allowAnimatedTransform),d={fileName:r,fileExtension:c,fileType:o,fittingType:e,preferredExtension:l,src:{id:t.id,width:t.width,height:t.height,isCropped:!1,isAnimated:pe(t.id,i?.hasAnimation)},focalPoint:{x:t.focalPoint&&t.focalPoint.x,y:t.focalPoint&&t.focalPoint.y},parts:[],devicePixelRatio:s,quality:0,upscaleMethod:me(i),progressive:!0,watermark:"",unsharpMask:{},filters:{},transformed:u};return u&&(Ce(d,t,n),Ae(d,i)),d}function Me(e,t,n){const i={...n},a=Ee("isMobile");switch(e){case O.LEGACY_BG_FIT_AND_TILE:case O.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:case O.LEGACY_BG_FIT_AND_TILE_VERTICAL:case O.LEGACY_BG_NORMAL:const e=a?A:S,n=a?w:y;i.width=Math.min(e,t.width),i.height=Math.min(n,Math.round(i.width/(t.width/t.height))),i.pixelAspectRatio=1}return i}const Re=q`fit/w_${"width"},h_${"height"}`,Ne=q`fill/w_${"width"},h_${"height"},al_${"alignment"}`,Fe=q`fill/w_${"width"},h_${"height"},fp_${"focalPointX"}_${"focalPointY"}`,xe=q`crop/x_${"x"},y_${"y"},w_${"width"},h_${"height"}`,ke=q`crop/w_${"width"},h_${"height"},al_${"alignment"}`,Ge=q`fill/w_${"width"},h_${"height"},al_${"alignment"}`,Pe=q`,lg_${"upscaleMethodValue"}`,Be=q`,q_${"quality"}`,He=q`,quality_auto`,Ve=q`,usm_${"radius"}_${"amount"}_${"threshold"}`,De=q`,bl`,Ye=q`,wm_${"watermark"}`,Ue={[U.CONTRAST]:q`,con_${"contrast"}`,[U.BRIGHTNESS]:q`,br_${"brightness"}`,[U.SATURATION]:q`,sat_${"saturation"}`,[U.HUE]:q`,hue_${"hue"}`,[U.BLUR]:q`,blur_${"blur"}`},$e=q`,enc_auto`,je=q`,enc_avif`,qe=q`,enc_pavif`,ze=q`,pstr`;function Ze(e,t,n,i={},a){if(X(t.id,i?.hasAnimation,i?.allowAnimatedTransform)){if(Q(t.id)||te(t.id)){const{alignment:o,...r}=n;t.focalPoint={x:void 0,y:void 0},delete t?.crop,a=Oe(e,t,r,i)}else a=a||Oe(e,t,n,i);return function(e){const t=[];e.parts.forEach((e=>{switch(e.transformType){case M.CROP:t.push(xe(e));break;case M.LEGACY_CROP:t.push(ke(e));break;case M.LEGACY_FILL:let n=Ge(e);e.upscale&&(n+=Pe(e)),t.push(n);break;case M.FIT:let i=Re(e);e.upscale&&(i+=Pe(e)),t.push(i);break;case M.FILL:let a=Ne(e);e.upscale&&(a+=Pe(e)),t.push(a);break;case M.FILL_FOCAL:let o=Fe(e);e.upscale&&(o+=Pe(e)),t.push(o)}}));let n=t.join("/");return e.quality&&(n+=Be(e)),e.unsharpMask&&(n+=Ve(e.unsharpMask)),e.progressive||(n+=De(e)),e.watermark&&(n+=Ye(e)),e.filters&&(n+=Object.keys(e.filters).map((t=>Ue[t](e.filters))).join("")),e.fileType!==$.GIF&&(e.encoding===j.AVIF?(n+=je(e),n+=He(e)):e.encoding===j.PAVIF?(n+=qe(e),n+=He(e)):e.autoEncode&&(n+=$e(e))),e.src?.isAnimated&&e.transformed&&(n+=ze(e)),`${e.src.id}/${v}/${n}/${e.fileName}.${e.preferredExtension}`}(a)}return t.id}const We={[R.CENTER]:"50% 50%",[R.TOP_LEFT]:"0% 0%",[R.TOP_RIGHT]:"100% 0%",[R.TOP]:"50% 0%",[R.BOTTOM_LEFT]:"0% 100%",[R.BOTTOM_RIGHT]:"100% 100%",[R.BOTTOM]:"50% 100%",[R.RIGHT]:"100% 50%",[R.LEFT]:"0% 50%"},Je=Object.entries(We).reduce(((e,[t,n])=>(e[n]=t,e)),{}),Xe=[O.TILE,O.TILE_HORIZONTAL,O.TILE_VERTICAL,O.LEGACY_BG_FIT_AND_TILE,O.LEGACY_BG_FIT_AND_TILE_HORIZONTAL,O.LEGACY_BG_FIT_AND_TILE_VERTICAL],Ke=[O.LEGACY_ORIGINAL_SIZE,O.ORIGINAL_SIZE,O.LEGACY_BG_NORMAL];function Qe(e,t,{width:n,height:i}){return e===O.TILE&&t.width>n&&t.height>i}function et(e,{width:t,height:n}){if(!t||!n){const i=t||Math.min(980,e.width),a=i/e.width;return{width:i,height:n||e.height*a}}return{width:t,height:n}}function tt(e,t,n,i="center"){const a={img:{},container:{}};if(e===O.SCALE_TO_FILL){const e=t.focalPoint&&function(e){const t=`${e.x}% ${e.y}%`;return Je[t]||""}(t.focalPoint),o=e||i;t.focalPoint&&!e?a.img={objectPosition:nt(t,n,t.focalPoint)}:a.img={objectPosition:We[o]}}else[O.LEGACY_ORIGINAL_SIZE,O.ORIGINAL_SIZE].includes(e)?a.img={objectFit:"none",top:"auto",left:"auto",right:"auto",bottom:"auto"}:Xe.includes(e)&&(a.container={backgroundSize:`${t.width}px ${t.height}px`});return a}function nt(e,t,n){const{width:i,height:a}=e,{width:o,height:r}=t,{x:s,y:c}=n;if(!o||!r)return`${s}% ${c}%`;const l=Math.max(o/i,r/a),u=i*l,d=a*l,h=Math.max(0,Math.min(u-o,u*(s/100)-o/2)),g=Math.max(0,Math.min(d-r,d*(c/100)-r/2));return`${h&&Math.floor(h/(u-o)*100)}% ${g&&Math.floor(g/(d-r)*100)}%`}const it={width:"100%",height:"100%"};function at(e,t,n,i={}){const{autoEncode:a=!0,isSEOBot:o,shouldLoadHQImage:r,hasAnimation:s,allowAnimatedTransform:c,encoding:l}=i;if(!J(e,t,n))return B;const u=void 0===c||c,d=X(t.id,s,u);if(!d||r)return ot(e,t,n,{...i,autoEncode:a,useSrcset:d});const h={...n,...et(t,n)},{alignment:g,htmlTag:m}=h,p=Qe(e,t,h),f=function(e,t,{width:n,height:i},a=!1){if(a)return{width:n,height:i};const o=!Ke.includes(e),r=Qe(e,t,{width:n,height:i}),s=!r&&Xe.includes(e),c=s?t.width:n,l=s?t.height:i,u=o?function(e,t){return e>900?t?.05:.15:e>500?t?.1:.18:e>200?.25:1}(c,K(t.id)):1;return{width:r?1920:c*u,height:l*u}}(e,t,h,o),E=function(e,t,n){return n?0:Xe.includes(t)?1:e>200?2:3}(h.width,e,o),T=function(e,t){const n=Xe.includes(e)&&!t;return e===O.SCALE_TO_FILL||n?O.SCALE_TO_FIT:e}(e,p),_=tt(e,t,n,g),{uri:I}=ot(T,t,{...f,alignment:g,htmlTag:m},{autoEncode:a,filters:E?{blur:E}:{},hasAnimation:s,allowAnimatedTransform:u,encoding:l}),{attr:L={},css:b}=ot(e,t,{...h,alignment:g,htmlTag:m},{});return b.img=b.img||{},b.container=b.container||{},Object.assign(b.img,_.img,it),Object.assign(b.container,_.container),{uri:I,css:b,attr:L,transformed:!0}}function ot(e,t,n,i){let a={};if(J(e,t,n)){const o=Me(e,t,n),r=Oe(e,t,o,i);a.uri=Ze(e,t,o,i,r),i?.useSrcset&&(a.srcset=function(e,t,n,i,a){const o=n.pixelAspectRatio||1;return{dpr:[`${1===o?a.uri:Ze(e,t,{...n,pixelAspectRatio:1},i)} 1x`,`${2===o?a.uri:Ze(e,t,{...n,pixelAspectRatio:2},i)} 2x`]}}(e,t,o,i,a)),Object.assign(a,function(e,t){let n;return n=t.htmlTag===x.BG?_e:t.htmlTag===x.SVG?ve:be,n(e,t)}(r,o),{transformed:r.transformed})}else a=B;return a}const rt="https://static.wixstatic.com/media/";"undefined"!=typeof window&&window.devicePixelRatio;Te();Te();const st=rt,{STATIC_MEDIA_URL:ct}=e,lt=({fittingType:e,src:t,target:n,options:i})=>{const a=at(e,t,n,{...i,autoEncode:!0});return a?.uri&&!/^[a-z]+:/.test(a.uri)&&(a.uri=`${ct}${a.uri}`),a},ut=/^[a-z]+:/,dt=e=>{const{id:t,containerId:n,uri:a,alt:o,name:r="",role:s,width:c,height:l,displayMode:u,devicePixelRatio:d,quality:h,alignType:g,bgEffectName:m="",focalPoint:p,upscaleMethod:f,className:E="",crop:T,imageStyles:_={},targetWidth:I,targetHeight:L,targetScale:v,onLoad:C=(()=>{}),onError:S=(()=>{}),shouldUseLQIP:y,containerWidth:A,containerHeight:w,getPlaceholder:O,isInFirstFold:M,placeholderTransition:R,socialAttrs:N,isSEOBot:F,skipMeasure:x,hasAnimation:k,encoding:G}=e,P=i.useRef(null);let B="";const H="blur"===R,V=i.useRef(null);if(!V.current)if(O||y||M||F){const e={upscaleMethod:f,...h||{},shouldLoadHQImage:M,isSEOBot:F,hasAnimation:k,encoding:G};V.current=(O||lt)({fittingType:u,src:{id:a,width:c,height:l,crop:T,name:r,focalPoint:p},target:{width:A,height:w,alignment:g,htmlTag:"img"},options:e}),B=!V.current.transformed||M||F?"":"true"}else V.current={uri:void 0,css:{img:{}},attr:{img:{},container:{}},transformed:!1};const D=!F&&(O||y)&&!M&&V.current.transformed,Y=i.useMemo((()=>JSON.stringify({containerId:n,...n&&{containerId:n},...g&&{alignType:g},...x&&{skipMeasure:!0},displayMode:u,...A&&{targetWidth:A},...w&&{targetHeight:w},...I&&{targetWidth:I},...L&&{targetHeight:L},...v&&{targetScale:v},isLQIP:D,isSEOBot:F,lqipTransition:R,encoding:G,imageData:{width:c,height:l,uri:a,name:r,displayMode:u,hasAnimation:k,...h&&{quality:h},...d&&{devicePixelRatio:d},...p&&{focalPoint:p},...T&&{crop:T},...f&&{upscaleMethod:f}}})),[n,g,x,u,A,w,I,L,v,D,F,R,G,c,l,a,r,k,h,d,p,T,f]),U=V.current,$=U?.uri,j=U?.srcset,q=U.css?.img,z=`${b} ${E}`;i.useEffect((()=>{const e=P.current;C&&e?.currentSrc&&e?.complete&&C({target:e})}),[]);const Z=U&&!U?.transformed?`max(${c}px, 100%)`:I?`${I}px`:null;return i.createElement("wow-image",{id:t,class:z,"data-image-info":Y,"data-motion-part":`BG_IMG ${n}`,"data-bg-effect-name":m,"data-has-ssr-src":B,"data-animate-blur":!F&&D&&H?"":void 0,style:Z?{"--wix-img-max-width":Z}:{}},i.createElement("img",{src:$,ref:P,alt:o||"",role:s,style:{...q,..._},onLoad:C,onError:S,width:A||void 0,height:w||void 0,...N,srcSet:M?j?.dpr?.map((e=>ut.test(e)?e:`${ct}${e}`)).join(", "):void 0,fetchpriority:M?"high":void 0,loading:!1===M?"lazy":void 0,suppressHydrationWarning:!0}))};var ht="I5zqsT";var gt=e=>{var t,a;const{id:o,alt:r,role:s,className:l,imageStyles:u={},targetWidth:d,targetHeight:h,onLoad:g,onError:m,containerWidth:p,containerHeight:f,isInFirstFold:E,socialAttrs:T,skipMeasure:_,responsiveImageProps:I,zoomedImageResponsiveOverride:L}=e,b=d||p,v=h||f,C=b+"px",{fallbackSrc:S,srcset:y,css:A}=I||{};return S&&y&&A?i.createElement("img",n()({fetchpriority:E?"high":void 0,loading:!1===E?"lazy":void 0,sizes:C,srcSet:_?null==L?void 0:L.srcset:null==I?void 0:I.srcset,id:o,src:S,alt:r||"",role:s,style:{...u,..._?{...null==L||null==(t=L.css)?void 0:t.img}:{...null==I||null==(a=I.css)?void 0:a.img}},onLoad:g,onError:m,className:c(l,ht),width:b,height:v},T)):i.createElement(dt,e)};let mt=function(e){return e[e.Loading=0]="Loading",e[e.Loaded=1]="Loaded",e[e.Empty=2]="Empty",e[e.Hidden=3]="Hidden",e}({});function pt(e){const[t,n]=(0,i.useState)((a=e.image)?a.name?E()?mt.Loading:mt.Loaded:mt.Empty:mt.Hidden);var a;return{onError:()=>n(mt.Empty),onLoad:()=>n(mt.Loaded),thumbnailState:t}}var ft="U603xX",Et="FedNkl",Tt="Z3eRZ6",_t="UXNCo3",It="D_fVyl",Lt="CA8K4D",bt="zQjJyB";const vt=e=>{var t,n,i;let{action:a,id:o,item:s}=e;const{thumbnailState:l,onError:u,onLoad:d}=pt(s),h="fit"===(null==(t=s.image)?void 0:t.resizeMode)?"fit":"fill";return r().createElement("div",{className:ft,title:s.title,onClick:()=>a(),"data-testid":"suggestion-item-action"},l!==mt.Hidden&&r().createElement("div",{className:c(Tt,{[_t]:l===mt.Empty,[It]:l===mt.Loading}),"data-testid":"thumbnail"},l!==mt.Empty&&r().createElement(gt,{alt:s.title,containerId:o,displayMode:h,height:(null==(n=s.image)?void 0:n.height)||55,id:"thumb-"+o,name:s.title,onError:u,onLoad:d,uri:s.image.name,width:(null==(i=s.image)?void 0:i.width)||73})),r().createElement("div",{className:Et},r().createElement("span",{className:Lt,dangerouslySetInnerHTML:{__html:s.title}}),s.description&&r().createElement("p",{className:bt,dangerouslySetInnerHTML:{__html:s.description}})))};var Ct="u6Qhf2",St="Nn5HXB";const yt=e=>{let{item:t}=e;return i.createElement("div",{className:Ct},i.createElement("div",{className:St},i.createElement("span",null,t.title)))};var At="k6cep8",wt="Zg1VXg",Ot="q0F5lM";const Mt=e=>{let{scrollIntoRef:t,suggestions:n}=e;return i.createElement("div",{className:c(At,{[wt]:!(null!=n&&n.footer)}),role:"listbox"},null==n?void 0:n.items.map((e=>{let{action:n,id:a,isActive:o,item:r,testId:s,type:l}=e;return i.createElement("div",{"aria-selected":o,className:c({[Ot]:!!r.url}),"data-testid":s,key:a,ref:o?t:void 0,role:"option"},"item"===l?i.createElement(vt,{action:n,id:a,item:r}):i.createElement(yt,{action:n,id:a,item:r}))})))};var Rt;function Nt(){return Nt=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{children:t,onClick:n}=e;return i.createElement("div",{className:kt},i.createElement("button",{className:Gt,role:"link","data-testid":"suggestions-show-all-button",onClick:n},t))};var Bt="g3as8r",Ht="TrbL5O",Vt="h0H1OP";const Dt=e=>{let{id:t,onSuggestionsFooterClick:n,query:a,translations:o,useModalSuggestions:r}=e;const s=o.footerSearchAllText+' "'+a+'"',c=()=>{null==n||n({type:"suggestionsFooterClick",compId:t})};return r?i.createElement(Pt,{onClick:c},s):i.createElement("button",{className:Bt,role:"link","data-testid":"footer-link",onClick:c},i.createElement(Ft,{className:Ht}),i.createElement("span",{className:Vt},s))};var Yt="_xpJkc",Ut="JK71Yc",$t="oRg3Ie",jt="UaSQpI";const qt=e=>{(e=>{let{callback:t,ref:n,elem:a}=e;(0,i.useEffect)((()=>{const e=new ResizeObserver(t);return null!=n&&n.current&&e.observe(n.current),a&&e.observe(a),()=>{e.disconnect()}}),[n,a,t])})({callback:(0,i.useCallback)((()=>{var t,n;const i=null==e||null==(t=e.current)?void 0:t.clientHeight;null==e||null==(n=e.current)||n.style.setProperty("--component-height",i+"px")}),[e]),ref:e})},zt=e=>{let{id:t,children:n,parentRef:a,isSuggestionsShown:o,onSuggestionsFooterClick:r,query:s,scrollIntoRef:l,suggestions:u,translations:d,useModalSuggestions:h}=e;return qt(a),i.createElement("div",{className:c(Yt,{[Ut]:o})},i.createElement("div",{className:$t},n),o&&i.createElement("div",{className:jt,"aria-hidden":"true"},i.createElement(Mt,{scrollIntoRef:l,suggestions:u}),(null==u?void 0:u.footer)&&i.createElement(Dt,{id:t,onSuggestionsFooterClick:r,query:s,translations:d,useModalSuggestions:h})))};function Zt(e,t){const{id:n,value:a,onSuggestionGroupSelect:o,onSuggestionSelect:r,suggestions:s}=e,[c,l]=i.useState(-1),u=i.useRef(null);i.useEffect((()=>{u.current&&(null==u.current.scrollIntoView||u.current.scrollIntoView(!1))}),[c]),i.useEffect((()=>{t||l(-1)}),[t]),i.useEffect((()=>{l(-1)}),[a]);const d=i.useMemo((()=>function(e,t){let{id:n,suggestions:i,onSuggestionGroupSelect:a,onSuggestionSelect:o}=e;return null!=i&&i.items?{...i,items:i.items.map(((e,i)=>{const r=e.type,s=[xt,i],c=s.join("");return"image"in e&&e.image&&s.push(e.image.name),{action:()=>{const t={compId:n,syntheticEvent:e};"group"===r?null==a||a({type:"suggestionGroupSelect",...t}):null==o||o({type:"suggestionSelect",...t})},id:s.join("_"),isActive:i===t,item:{...e,url:"group"===r?void 0:e.url},testId:c,type:r}}))}:{...i,items:[]}}({id:n,onSuggestionGroupSelect:o,onSuggestionSelect:r,suggestions:s},c)),[c,n,o,r,s]),h=d.items.filter((e=>e.item.url)),g=h.length,m=h.findIndex((e=>{var t;return e.id===(null==(t=d.items[c])?void 0:t.id)}));return{moveDown:()=>{const e=m{var n;return t.id===(null==(n=h[e])?void 0:n.id)})))},moveUp:()=>{const e=m>0?m-1:g-1;l(d.items.findIndex((t=>{var n;return t.id===(null==(n=h[e])?void 0:n.id)})))},navigate:()=>{try{var e;null==d||null==(e=d.items)||e[c].action()}catch(e){console.error("Error while navigating",e)}},scrollIntoRef:u,activeOptionIndex:c,suggestionsWithNavigation:d}}const Wt=function(e,t,n,a){void 0===a&&(a=!0),(0,i.useEffect)((()=>{const i=e=>{const i=e.target;if(i){for(const e of t){var a;if(e instanceof HTMLElement){if(e&&e.contains(i))return}else if(null!=e&&null!=(a=e.current)&&a.contains(i))return}n()}};return document.addEventListener(e,i,a),()=>{document.removeEventListener(e,i,a)}}),[...t,n,e])};var Jt,Xt=a(95561);function Kt(){return Kt=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{direction:t,onClick:n}=e;return i.createElement("div",{className:en,"data-testid":"modalSearchSuggestionsCloseButton",onClick:n},i.createElement(Qt,{className:c(tn,{[nn]:"rtl"===t})}))};var on="fuYJV8",rn="q4fpr5",sn="WRjDFM";const cn=()=>i.createElement("div",{className:on,"data-testid":"suggestions-loader"},i.createElement("svg",{viewBox:"0 0 50 50",className:rn},i.createElement("circle",{className:sn,cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"2"})));var ln="RlO8U_",un="Q2YYMa",dn="oEUJj7",hn="TaFPqR";const gn=e=>{let{children:t,clearValue:n,closeSuggestions:a,direction:o,id:r,inputRef:s,onSuggestionsFooterClick:c,query:l,scrollIntoRef:u,suggestions:d,suggestionsLoading:h,translations:g,scopedClassName:m}=e;const[p,f]=i.useState();i.useEffect((()=>{const e=document.createElement("div");return document.body.appendChild(e),m&&e.classList.add(m),f(e),()=>{document.body.removeChild(e)}}),[m]);return i.useEffect((()=>{setTimeout((()=>{var e;null==(e=s.current)||e.focus()}),400)}),[]),p?(0,Xt.createPortal)(i.createElement("div",{dir:o,className:ln,"data-testid":"modalSearchSuggestions",role:"dialog"},i.createElement("div",{className:un},i.createElement(an,{direction:o,onClick:()=>{a(),n()}}),i.createElement("div",{className:dn},t)),i.createElement("div",{className:hn,onScroll:()=>{var e;null==(e=s.current)||e.blur()}},i.createElement(Mt,{scrollIntoRef:u,suggestions:d}),(null==d?void 0:d.footer)&&i.createElement(Dt,{id:r,onSuggestionsFooterClick:c,query:l,translations:g,useModalSuggestions:!0}),h&&i.createElement(cn,null))),p):null},mn=({size:e,...t})=>i.createElement("svg",{viewBox:"0 0 20 20",fill:"currentColor",width:e||"20",height:e||"20",...t},i.createElement("path",{fillRule:"evenodd",d:"M9.5,3 C13.084,3 16,5.916 16,9.5 C16,13.084 13.084,16 9.5,16 C5.916,16 3,13.084 3,9.5 C3,5.916 5.916,3 9.5,3 Z M9.5,4 C6.467,4 4,6.467 4,9.5 C4,12.533 6.467,15 9.5,15 C12.533,15 15,12.533 15,9.5 C15,6.467 12.533,4 9.5,4 Z M10,11 L10,12 L9,12 L9,11 L10,11 Z M10,7 L10,10 L9,10 L9,7 L10,7 Z"}));mn.displayName="ErrorSmall";var pn=mn,fn="TLWrjM",En="GIPQqH",Tn="JNgJbf";const _n=e=>{let{errorMessage:t,errorMessageType:n,shouldShowValidityIndication:a,translations:o,dataHook:r,componentViewMode:s}=e;const c="editor"===s?(null==o?void 0:o.errorMessage)||"Error text displays here.":t;return"inline"===n&&a&&c?i.createElement("div",{"data-hook":r||"inline-error-message",className:fn},i.createElement(pn,{className:En}),i.createElement("span",{className:Tn},c)):null};var In={root:"text-input",inputEl:"text-input__input",inputLabel:"text-input__label"},Ln={input:"KvoMHf",hideNumberSpinner:"ErucfC",AppsTextInputSkin:"MpKiNN",appsTextInputSkin:"MpKiNN",inputWrapper:"pUnTVX",prefix:"eXvLsN","validation-indication":"LyB02C",validationIndication:"LyB02C",label:"wPeA6j",hasLabel:"qzvPmW","required-indication":"lPl_oN",requiredIndication:"lPl_oN",ResponsiveTextInputSkin:"ZXdXNL",responsiveTextInputSkin:"ZXdXNL"};const bn="Please enter a phone number with {digits} digits",vn="Please enter between 4 to 17 digits. You can include hyphens (-) or start with a (+), e.g., 555-123-4567 or +(222)987654321",Cn="Please enter between 4 to 17 digits. You can include dividers (-), e.g., 555-123-4567.",Sn=function(e,t,n){void 0===n&&(n=!0);return Array.from(t).reduce(((e,t,n)=>"-"===t?[...e,n]:e),[]).filter(((t,i)=>n?t<=e.length:t<=e.length+i))},yn=(e,t)=>t.replace("{digits}",""+(e?e.replace(/-/g,"").length:0)),An=()=>{},wn=(e,t)=>{var a;const{skin:o,name:r,id:s,className:l="",customClassNames:u=[],dataTestId:d,value:h,inputType:g="text",label:p,placeholder:E,readOnly:_,required:L,isDisabled:b,pattern:v,autoComplete:C,autoComplete_:S,maxLength:y,min:A,max:w,step:O,numberSpinnerHidden:M,shouldShowValidityIndication:R,isValid:N,autoFocus:F,prefix:x,phoneFormat:k="",errorMessageType:G="tooltip",validateValue:P=An,setValidityIndication:B=An,onBlur:H=An,onFocus:V=An,onKeyPress:D=An,onInput:Y=An,onValueChange:U=An,onChange:$=An,onClick:j=An,onDblClick:q=An,onMouseEnter:z=An,onMouseLeave:Z=An,onHydrationComplete:W=An,ariaAttributes:J,contentRef:X,translations:K,componentViewMode:Q,textInputAutoFillFixEnabled:ee}=e,te=i.useRef(null),[ne,ie]=i.useState(!0);i.useImperativeHandle(t,(()=>({focus:()=>{var e;null==(e=te.current)||e.focus()},blur:()=>{var e;null==(e=te.current)||e.blur()},setCustomValidity:t=>{var n,i;"message"===t.type?null==(n=te.current)||n.setCustomValidity(t.message):null==(i=te.current)||i.setCustomValidity(((e,t)=>{let{translations:n,phoneFormat:i}=t;switch(e.key){case"PHONE_FORMAT_LENGTH_VALIDATION_ERROR":return yn(i,(null==n?void 0:n.phoneFormatLengthValidationError)||bn);case"PHONE_FORMAT_DEFAULT_VALIDATION_ERROR":return(null==n?void 0:n.phoneFormatDefaultValidationError)||vn;case"PHONE_FORMAT_COMPLEX_PHONE_DEFAULT_VALIDATION_ERROR":return(null==n?void 0:n.phoneFormatComplexPhoneDefaultValidationError)||Cn;default:return e.key}})(t,{translations:e.translations,phoneFormat:e.phoneFormat}))},getValidationMessage:()=>{var e;return null==(e=te.current)?void 0:e.validationMessage}})));const ae=i.useRef(),oe=i.useMemo((()=>"tel"===g&&k?((e,t)=>{const n=Sn(e,t,!1),i=Array.from(e);return n.forEach((e=>{e{let{shouldHideValidityIndication:t,shouldCallOnInput:n}=e;return e=>{const{value:i}=e.target;let a=i;if(k){const e=i.length{const i=Sn(e,t);return i.reduce(((t,a,o)=>{if(" "===e[a])t.splice(a-o,1);else if(" "!==e[a+1]||n)" "===e[a-1]&&n&&(e.split(" ").length-1{ee&&!ue()&&$({...e,type:"change"})})(e),P()),t&&B(!1),n&&Y(e)}};i.useEffect((()=>{var e,t;re({shouldHideValidityIndication:!0,shouldCallOnInput:!1})({target:{value:null!=(e=null==(t=te.current)?void 0:t.value)?e:""}}),W({type:"onHydrationComplete"})}),[]);const se=c(Ln[o],l,I(In.root,...u),{[Ln.hasLabel]:!!p,[Ln.requiredIndication]:L,[Ln.validationIndication]:!!R}),{"aria-label":ce,...le}=f(J),ue=()=>!!te.current&&te.current===document.activeElement;return i.createElement("div",n()({id:s},T(e),{ref:X,className:se,"data-testid":d,onClick:e=>{b||j(e)},onDoubleClick:e=>{b||q(e)},onMouseEnter:e=>{b||z(e)},onMouseLeave:e=>{b||Z(e)}}),!!p&&i.createElement("label",{htmlFor:"input_"+s,className:c(Ln.label,I(In.inputLabel))},p),i.createElement("div",{className:Ln.inputWrapper},x&&i.createElement("div",{className:Ln.prefix},x),i.createElement("input",n()({name:r,ref:te,id:"input_"+s,className:c(Ln.input,m,I(In.inputEl),{[Ln.hideNumberSpinner]:M}),type:g,value:oe,onFocus:V,onKeyDown:D,onChange:re({shouldHideValidityIndication:!0,shouldCallOnInput:!0}),onBlur:e=>{H(e),ae.current&&$({...e,type:"change"}),ae.current=!1,B(!0),ne&&ie(!1)},placeholder:E,readOnly:_,required:L,"aria-required":L,"aria-invalid":(()=>{var e;if(!1===N)return!0;const t=!(null!=(e=te.current)&&e.validity.valid);return!ne&&t})(),pattern:v,maxLength:(()=>{let e=null===y?void 0:y;return k&&(e=k.length),e})(),minLength:k?k.length:void 0,disabled:b,autoComplete:C?"on":S||"off",step:null===O?void 0:O,min:null===A?void 0:A,max:null===w?void 0:w,autoFocus:F,"aria-label":ce||p?ce:E},le))),i.createElement(_n,{errorMessageType:G,errorMessage:null==(a=te.current)?void 0:a.validationMessage,shouldShowValidityIndication:R,translations:K,componentViewMode:Q}))};var On=i.forwardRef(wn);const Mn={left:"onSwipeLeft",right:"onSwipeRight",up:"onSwipeUp",down:"onSwipeDown"},Rn=e=>{if(e.touches&&e.touches.length){const t=e.touches[0];return{x:t.pageX,y:t.pageY}}},Nn={touched:!0,moved:!1,deltaCoords:{x:0,y:0}},Fn=(e,t,n)=>()=>{let i;const a=e=>{i={...Nn,numOfTouches:e.touches.length,startCoords:Rn(e),startTime:Date.now(),evObj:{...e}}},o=e=>{if(!i)return;const t=Rn(e);if(t){i.startCoords||(i.startCoords=t);const e=i.startCoords.x-t.x,n=i.startCoords.y-t.y;i.moved=!0,i.deltaCoords={x:e,y:n}}},r=()=>{if(i)if(i.endTime=Date.now(),"onTap"===e&&(e=>e.touched&&!e.moved&&1===e.numOfTouches)(i))t(i.evObj);else if((e=>e.moved&&1===e.numOfTouches&&e.endTime-e.startTime<500&&(Math.abs(e.deltaCoords.x)>100||Math.abs(e.deltaCoords.y)>60))(i)){const n=((e,t)=>{let n;return n=Math.abs(e)>Math.abs(t)?e>0?"left":"right":t>0?"up":"down",n})(i.deltaCoords.x,i.deltaCoords.y);e===Mn[n]&&t(i.evObj)}};return n&&n.current&&(n.current.addEventListener("touchstart",a,{passive:!0}),n.current.addEventListener("touchmove",o,{passive:!0}),n.current.addEventListener("touchend",r,{passive:!0})),()=>{n&&n.current&&(n.current.removeEventListener("touchstart",a),n.current.removeEventListener("touchmove",o),n.current.removeEventListener("touchend",r))}};var xn;function kn(){return kn=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{onClick:t,label:n,clearButtonText:a}=e;return i.createElement("button",{"aria-label":n,className:Pn,"data-testid":"clear-button",onClick:t,type:"button"},i.createElement(Gn,null),i.createElement("span",{className:Bn},a))};var Vn="nNn3mc",Dn="LIyiar",Yn="fkomZa",Un="LYhw1A",$n="FwtNU8";const jn={autoComplete_:"off",autoComplete:!1,required:!1,shouldShowValidityIndication:!1,skin:"ResponsiveTextInputSkin",validateValueAndShowIndication:()=>{}},qn=e=>{let{autocompleteValue:t,changeValue:a,clearButtonLabel:o,clearValue:s,containerRef:l,id:u,inputRef:d,isDisabled:h,onAutocomplete:g,onBlur:m,onChange:p,onClick:f,onDblClick:E,onFocus:T,onKeyPress:_,placeholder:b,value:v,isModalSuggestionsShown:C,clearButtonText:S}=e;const y=Boolean(v),A=(0,i.useCallback)((e=>{e!==v&&(a(e),null==p||p({type:"change",compId:u,previousValue:v}))}),[u,a,p,v]);(0,i.useEffect)((()=>{const e=document.activeElement;e&&e.id.includes(u)&&!C&&e.dispatchEvent(new FocusEvent("focus"))}),[]);const[w,O,M,R]=(e=>{let{autocompleteValue:t,id:n,onAutocomplete:a,onChange:o,value:r}=e;const[s,c]=(0,i.useState)(!0),l=(0,i.useMemo)((()=>{if(!t||!s)return"";const e=r.toLocaleLowerCase().trimStart();if(!e)return"";const n=t.toLocaleLowerCase();if(!n.startsWith(e)||n===e)return"";const i=t.substr(e.length);return""+r+i}),[t,r,s]),u=(0,i.useCallback)((()=>{o(l),null==a||a({type:"autocomplete",compId:n,previousValue:r})}),[n,l,o,a,r]),d=(0,i.useCallback)((e=>{if(!l)return;const{key:t,currentTarget:n}=e,{selectionStart:i,selectionEnd:a}=n;if("Tab"===t)e.preventDefault(),e.stopPropagation();else if("ArrowRight"!==t||i!==a||i!==r.length)return;u()}),[l,r,u]),h=(0,i.useCallback)((()=>{l&&u()}),[l,u]);return[l,d,e=>{const{scrollLeft:t,scrollWidth:n,clientWidth:i}=e.currentTarget;c(0===t&&n<=i)},h]})({autocompleteValue:t,id:u,onAutocomplete:g,onChange:A,value:v});var N,F,x;return N="onSwipeRight",F=R,x=l,i.useEffect(Fn(N,F,x),[N,x,F]),r().createElement("div",{className:c(Vn,{[Dn]:y})},r().createElement("div",{className:Un},w&&r().createElement(On,n()({},jn,{className:Yn,inputType:"text",id:"search-box-autocomplete-input-"+u,dataTestId:"search-box-autocomplete-input",isDisabled:!0,readOnly:!0,value:w})),r().createElement(On,n()({},jn,{className:c($n,I(L.input)),inputType:"search",ariaAttributes:{label:b},id:"search-box-input-"+u,dataTestId:"search-box-input",isDisabled:h,maxLength:100,onBlur:m,onClick:f,onDblClick:E,onFocus:T,onInput:e=>{M(e)},onValueChange:A,onKeyPress:e=>{O(e),null==_||_(e)},placeholder:b,readOnly:h,ref:d,value:v,name:"q"}))),y&&r().createElement(Hn,{onClick:s,label:o,clearButtonText:S}))};var zn="TmqMif";const Zn=()=>i.createElement("div",{className:c(zn,I(L.icon))},i.createElement(Ft,null));var Wn="aXOBOn",Jn="KsMOVs",Xn="ipSfdV",Kn="lS0Z88";const Qn=e=>{let{autocompleteValue:t,changeValue:n,clearButtonLabel:a,clearValue:o,id:s,inputRef:l,isDisabled:u,onAutocomplete:d,onBlur:h,onChange:g,onClick:p,onDblClick:f,onFocus:E,onKeyPress:T,placeholder:_,clearButtonText:I,searchButtonLabel:L,value:b,isModalSuggestionsShown:v}=e;const C=(0,i.useRef)(null);return r().createElement("div",{className:Wn,ref:C},r().createElement("div",{className:Jn}),r().createElement("div",{className:Xn,"data-testid":"search-icon"},r().createElement(Zn,null)),r().createElement(qn,{containerRef:C,clearButtonLabel:a,isDisabled:u,id:s,inputRef:l,onBlur:h,clearValue:o,onClick:p,onDblClick:f,onFocus:E,onChange:g,onKeyPress:T,onAutocomplete:d,placeholder:_,autocompleteValue:t,changeValue:n,value:b,isModalSuggestionsShown:v,clearButtonText:I}),r().createElement("button",{"aria-label":L,className:c(Kn,m),onClick:e=>{e.stopPropagation()},type:"submit"},r().createElement(Zn,null)))};var ei="wdVIxK",ti="yu5tzD",ni="shCc15",ii="Btc0MU";const ai=e=>{let{autocompleteValue:t,changeValue:n,clearButtonLabel:i,clearValue:a,dataTestId:o,expandedDesktopSuggestions:s,handleKeyDown:l,handleSubmit:u,id:d,inputRef:h,isDisabled:g,onAutocomplete:m,onBlur:p,onChange:f,onClick:E,onDblClick:T,onFocus:_,onKeyPress:I,placeholder:L,clearButtonText:b,defaultFormAction:v,value:C,isModalSuggestionsShown:S}=e;return r().createElement("form",{className:c(ei,{[ii]:!!s,[ti]:!!t}),"data-testid":o,onSubmit:u,role:"search",action:v,onClick:()=>{var e;return null==(e=h.current)?void 0:e.focus()},onKeyDown:l},r().createElement(Qn,{clearButtonLabel:i,isDisabled:g,id:d,inputRef:h,onBlur:p,clearValue:a,onClick:E,onDblClick:T,onFocus:_,onChange:f,onKeyPress:I,onAutocomplete:m,placeholder:L,clearButtonText:b,searchButtonLabel:L,changeValue:n,autocompleteValue:t,value:C,isModalSuggestionsShown:S}),r().createElement("input",{className:ni,type:"submit",tabIndex:-1,"aria-hidden":"true",value:L}))};var oi="QdV_oU",ri="btVOrl",si="HRqysE";function ci(e){let{searchButtonLabel:t,onFocus:n}=e;return r().createElement("button",{"aria-label":t,className:c(si,m),onFocus:n,onClick:e=>{e.stopPropagation()}},r().createElement(Zn,null))}const li=(e,t)=>{const{autocompleteEnabled:a,changeValue:o,clearSuggestions:s,closeParentContainer:g=!1,closeSuggestions:m,direction:p,id:f,className:E,customClassNames:_=[],isDisabled:b=!1,isSuggestionsOpen:v=!1,onAutocomplete:C,onBlur:S,onChange:y,onClear:A,onClick:w,onDblClick:O,onFocus:M,onKeyPress:R,onModalSuggestionsClose:N,onModalSuggestionsOpen:F,onMouseEnter:x,onMouseLeave:k,onSubmit:G,onSuggestionsFooterClick:P,placeholder:B="",clearButtonText:H,suggestions:V,suggestionsEnabled:D=!1,suggestionsLoading:Y=!1,translations:U,useModalSuggestions:$,defaultFormAction:j,value:q="",layout:z,scopedClassName:Z}=e,W=a&&e.autocompleteValue||"",[J,X]=(0,i.useState)(!1);(0,i.useImperativeHandle)(t,(()=>({focus:()=>{var e;null==(e=K.current)||e.focus()},blur:()=>{var e;null==(e=K.current)||e.blur()}})));const K=(0,i.useRef)(null),Q=(0,i.useRef)(null),ee=(0,i.useRef)(null),{shouldShowSuggestions:te,resetSuggestionsVisibility:ne}=(e=>{let{isSuggestionsOpen:t,parentRef:n,suggestions:a,suggestionsEnabled:o,useModalSuggestions:r}=e;const[s,c]=(0,i.useState)(!0),l=(0,i.useCallback)((()=>{c(!0)}),[]);(0,i.useEffect)(l,[o,t,l]);const u=(0,i.useCallback)((()=>{c(!1)}),[]);return Wt("focus",[n],u),Wt("click",[n],u),{shouldShowSuggestions:Boolean(o&&t&&(r||s&&a)),resetSuggestionsVisibility:l}})({isSuggestionsOpen:v,parentRef:ee,suggestions:V,suggestionsEnabled:D,useModalSuggestions:$});(0,i.useEffect)((()=>{if($)return te?null==F||F():null==N||N({closeParentContainer:g}),()=>{null==N||N({closeParentContainer:g})}}),[te,$]);const{activeOptionIndex:ie,moveDown:ae,moveUp:oe,navigate:re,scrollIntoRef:se,suggestionsWithNavigation:ce}=Zt(e,te),le=()=>{q&&(o(""),s(),null==y||y({type:"change",compId:f,previousValue:q}),null==A||A({type:"clear",compId:f,previousValue:q}))},ue=Boolean(te&&ce),de=ue&&$,he=ce.items.filter((e=>{let{type:t}=e;return"item"===t})).length,ge=he>0?U.numberOfSuggestionsEntries.replace(/{{amount}}/g,""+he):void 0,me={autocompleteValue:W,changeValue:o,clearButtonLabel:U.clearButtonText,clearValue:le,handleKeyDown:e=>{if(e.keyCode===u&&(ue&&!de?m():de?(m(),le()):le(),e.preventDefault()),te){const t={[d]:oe,[h]:ae,[l]:-1!==ie?re:void 0}[e.keyCode];t&&(t(),e.preventDefault())}},handleSubmit:e=>{var t;e.preventDefault(),null==(t=K.current)||t.blur(),null==G||G({type:"submit",compId:f})},id:f,isDisabled:b,onAutocomplete:C,onChange:y,onClick:w,onDblClick:O,onKeyPress:R,placeholder:B,clearButtonText:H,defaultFormAction:j,value:q,isModalSuggestionsShown:de},pe="icon-only"===z;return r().createElement("div",n()({id:f},T(e),{dir:p,ref:ee,className:c(ri,{[oi]:te,"search-box-component-focus-ring-visible":J},E,I(L.root,..._)),onMouseEnter:x,onMouseLeave:k,"aria-live":"polite","aria-label":ge,"data-testid":"search-box-container",tabIndex:-1}),de&&r().createElement(gn,{id:f,closeSuggestions:m,clearValue:le,inputRef:Q,onSuggestionsFooterClick:P,query:q,scrollIntoRef:se,suggestions:ce,suggestionsLoading:Y,translations:U,direction:p,scopedClassName:Z},r().createElement(ai,n()({},me,{dataTestId:"modal-suggestions-search-box-form",inputRef:Q}))),pe?r().createElement(ci,{searchButtonLabel:B,onFocus:M}):r().createElement(zt,{id:f,parentRef:ee,useModalSuggestions:$,isSuggestionsShown:ue&&!de,onSuggestionsFooterClick:P,query:q,scrollIntoRef:se,suggestions:ce,translations:U},r().createElement(ai,n()({},me,{dataTestId:"search-box-form",expandedDesktopSuggestions:te,inputRef:K,onBlur:e=>{null==S||S(e),X(!1)},onFocus:e=>{null==M||M(e),X(!0),ne()}}))))};const ui=e=>e.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`));var di;const hi={SearchBox:{component:r().forwardRef(li),controller:(di=e=>{let{mapperProps:t,controllerUtils:n,stateValues:i}=e;const{compId:a,isMobileView:o,...r}=t,{isScrollingBlocked:s,setSiteScrollingBlocked:c,enableCyclicTabbing:l,disableCyclicTabbing:u,getMenuContainerApiByChildId:d,scopedClassName:h}=i,g={...r,closeSuggestions(){n.updateProps({isSuggestionsOpen:!1,closeParentContainer:!1,suggestionsLoading:!1})},clearSuggestions(){n.updateProps({suggestions:null})},changeValue(e){n.updateProps({value:e})}};return o?{...g,onModalSuggestionsOpen:()=>{s||c(!0,a),l(a)},onModalSuggestionsClose:function(e){let{closeParentContainer:t=!1}=void 0===e?{}:e;if(s&&c(!1,a),t){const e=null==d?void 0:d(a);null==e||e.close(!0)}u(a)},scopedClassName:h}:g},{useComponentProps:(e,t,n)=>{const i=(e=>({...e,updateStyles:t=>{const n=Object.entries(t).reduce(((e,[t,n])=>{return{...e,[(i=t,i.startsWith("--")?t:ui(t))]:void 0===n?null:n};var i}),{});e.updateStyles(n)}}))(n);return di({mapperProps:e,stateValues:t,controllerUtils:i})}})}}}(),o}()})); //# sourceMappingURL=https://static.parastorage.com/services/editor-elements-library/dist/thunderbolt/rb_wixui.thunderbolt[SearchBox].ae73cd9d.bundle.min.js.map